package com.buss.purchase.dao;

import java.util.List;

import com.buss.core.persistence.Paginalbe;
import com.buss.core.persistence.ResultList;
import com.buss.purchase.model.PurchaseOrderDetail;

/**
 * 采购订单明细
 * @author gykl
 *
 */
public interface PurchaseOrderDetailDao {
	
	/**
	 * 保存订单明细信息
	 * @param detail
	 */
	public void saveOrderDetail(PurchaseOrderDetail detail);
	
	/**
	 * 修改订单明细信息
	 * @param detail
	 */
	public void editOrderDetail(PurchaseOrderDetail detail);
	
	/**
	 * 保存订单明细信息
	 * @param orderDetails
	 */
	public void saveOrderDetails(List<PurchaseOrderDetail> orderDetails);
	
	/**
	 * 修改订单明细信息
	 * @param orderDetails
	 */
	public void editOrderDetails(List<PurchaseOrderDetail> orderDetails);
	
	/**
	 * 删除指定订单明细信息
	 * @param ids
	 */
	public void removeOrderDetail(Long[] ids);
	
	/**
	 * 删除指定采购订单的明细信息
	 * @param masterId
	 */
	public void removeOrderDetailByMasterId(Long masterId);
	
	/**
	 * 获取指定的订单商品详情信息
	 * @param id
	 * @return
	 */
	public PurchaseOrderDetail loadOrderDetail(Long id);
	
	/**
	 * 根据单位编码、订单号和商品ID获取订单详情信息
	 * @param companyId
	 * @param orderNumber
	 * @param goodsId
	 * @return
	 */
	public PurchaseOrderDetail loadOrderDetail(String companyId,Long masterId,Long goodsId);
	
	/**
	 * 根据采购订单ID、商品类别、商品编码获取采购订单明细信息
	 * @param masterId	采购订单ID
	 * @param categoryId	商品类别ID
	 * @param goodsId	商品ID
	 * @return
	 */
	public ResultList<PurchaseOrderDetail> queryOrderDetail(Long masterId,Long categoryId,Long goodsId,Paginalbe page);
}
